<template>
  <view class="root">
    <acme-app-bar title="Cell"></acme-app-bar>
    
    <view class="ui-title">基础用法</view>
    <acme-cell title="单元格" value="内容" />
    
    <view class="ui-title">单元组</view>
    <acme-cell-group>
      <acme-cell title="单元格" value="内容" />
      <acme-cell title="单元格" value="内容" />
      <acme-cell title="单元格" value="内容" />
      <acme-cell title="单元格" value="内容" />
    </acme-cell-group>
    
    <view class="ui-title">导航</view>
    <acme-cell-group>
      <acme-cell title="navigateTo" link navigateTo="/pages/widget/popup/index"/>
      <acme-cell title="redirectTo" link redirectTo="/pages/widget/popup/index"/>
      <acme-cell title="reLaunch" link reLaunch="/pages/widget/popup/index"/>
      <acme-cell title="switchTab" value="禁用" link switchTab="/pages/widget/popup/index" disabled/>
    </acme-cell-group>

    <view class="ui-title">自定义图标（多行）</view>
    <acme-cell-group class="cell-group-icon">
      <acme-cell :title="item.title" link v-for="(item, index) in iconList" :key="item.title">
        <img class="icon" slot="left-icon" :src="item.icon"/>
      </acme-cell>
    </acme-cell-group>

    <view class="ui-title">卡片风格</view>
    <acme-cell-group :radius="10" width="95%">
      <acme-cell title="单元格" link />
      <acme-cell title="单元格" link />
      <acme-cell title="单元格" link />
      <acme-cell title="单元格" link />
    </acme-cell-group>

    <view class="ui-title">自定义样式</view>
    <acme-cell title="自定义" value="内容" :radius="15" link style="width: 95%; height: 45px"/>
  </view>
</template>

<script>
  import AcmeCellGroup from "@/components/acme-design/cell-group"
  import AcmeCell from "@/components/acme-design/cell"
  export default {
    components: {
      AcmeCellGroup,
      AcmeCell,
    },
    data() {
      return {
        iconList: [
          {
            title: '公益',
            icon: 'https://www.qiniu.lingchen.kim/hezuo.png'
          },{
            title: '私信',
            icon: 'https://www.qiniu.lingchen.kim/sixin.png'
          },{
            title: '预约',
            icon: 'https://www.qiniu.lingchen.kim/gouwu.png'
          },{
            title: '草稿箱',
            icon: 'https://www.qiniu.lingchen.kim/caogaoxiang.png'
          },{
            title: '云服务',
            icon: 'https://www.qiniu.lingchen.kim/yun.png'
          },
        ]
      };
    },
    methods: {},
  };
</script>


<style lang="scss" scoped>
  .root {
    padding-bottom: 20px;

    .cell-group-icon {
      .icon {
        width: 26px;
        margin-right: 12px;
      }
    }

    .iconfont {
      margin-right: 12px;
      font-size: 22px;
    }
  }
</style>